The present invention generally relates to processing of image data and more particularly to an image data processing method for compressing two-dimensional curve image data.
In the field of image processing, a two-dimensional curve image, i.e. a font character, is usually decomposed into a number of segments, and vectors are assigned in correspondence to each of the segments. Thus, the curve is represented by a number of vectors each corresponding to the segment. In such a method, when the curve has a large curvature or is intricate, a large number of vectors are needed. Associated therewith, information to be processed is increased, which causes a difficulty in transmission or storage in memory.
The motivation for using mathematical formats for fonts is to achieve a more compact description of characters. By introducing new types of mathematical objects that are tailored to the characters, the amount of data needed to store the description is reduced. The chosen primitives differ for the various font families depending on the typical shapes of the characters themselves.
The compression occurs for two reasons. The first is the fact that individual character scripts have lots of similarities and these similarities can be exploited by choosing a mathematical basis of either various kinds of areas or various kinds of lines. The basis itself is not static but can have mathematical transformations applied to its elements. These transformations include, but are not limited to stretching, expanding, contracting, and bending. The transformations themselves are finite and are encoded using a few parameters.
The second reason that compression occurs is that the individual set of areas or lines describe the respective curves in a more compact fashion than do a series of dots connecting outlines (like TrueType or PostScript) since the finite set of areas or lines are better suited to the curves than an arbitrary choice of connection such as a B-spline employed by both TrueType and PostScript.
There is therefore a need for a system capable of utilizing mathematical representations in an optimal manner during the course of character compression.
A system, method and computer program product are provided for compression of characters. Initially, characters are received after which a mathematical representation for the characters is selected based on a desired level of compression quality of the characters. Such characters are then represented using the selected mathematical representation so that the mathematical representation of the characters may be compressed.
In one embodiment of present invention, the mathematical representation may include parameterized curves, rational functions, and/or polynomials. Such polynomials may include exponents that are a power of two (2). Further, a width of a portion of the characters may be represented by a mathematical representation including a curve and two functions which indicate distances perpendicular to the curve.